<?php
namespace Framework\DiServices;

class Sentry
{
    private $dns = '';
    public function __construct($config)
    {
        $this->dns = $config['dns'];
    }

    public function captureException($exception)
    {
        if (ENVIRONMENT == 'production') {
            \Sentry\init(['dsn' => $this->dns]);
            \Sentry\captureException($exception);
        }
    }
}
